import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const document: AppRouteModule = {
  path: '/document',
  name: 'Document',
  component: LAYOUT,
  redirect: '/document/index',
  meta: {
    orderNo: 10,
    icon: 'ion:document',
    title: t('routes.document.union.index'),
  },
  children: [
    {
      path: 'index',
      name: 'DocumentsList',
      component: () => import('/@/views/document/list.vue'),
      meta: {
        title: t('routes.document.union.list'),
        ignoreKeepAlive: false,
      },
    },
    {
      path: 'activity',
      name: 'DocumentActivity',
      component: () => import('/@/views/document/activity.vue'),
      meta: {
        title: t('routes.document.union.activity'),
      },
    },
    {
      path: 'edit',
      name: 'DocumentEdit',
      component: () => import('/@/views/document/edit.vue'),
      meta: {
        title: t('routes.document.union.categories'),
        ignoreKeepAlive: true,
        hideMenu: true,
      },
    },
    {
      path: 'productManager',
      name: 'DocumentProductManager',
      component: () => import('/@/views/document/productManager.vue'),
      meta: {
        title: t('routes.document.union.productManager'),
        ignoreKeepAlive: true,
        hideMenu: true,
      },
    },
    {
      path: 'productEdit',
      name: 'DocumentProductEdit',
      component: () => import('/@/views/document/ProductEdit.vue'),
      meta: {
        title: t('routes.document.union.productEdit'),
        ignoreKeepAlive: true,
        hideMenu: true,
      },
    },
    {
      path: 'refund',
      name: 'RefundManagement',
      meta: {
        title: t('routes.document.union.refund'),
        ignoreKeepAlive: false,
      },
      component: () => import('/@/views/document/refund/list.vue'),
    },
  ],
};

export default document;
